﻿package j.sus2maj7.encoding
{
	import flash.utils.ByteArray;
	
	import j.sus2maj7.ability.*;
	
	public interface IBinary extends IDestroyable
	{
		function toString():String;
		function get ba():ByteArray;
		
		function get bytesAvailable():uint;
		//function get defaultObjectEncoding():uint;
		//function set defaultObjectEncoding(value:uint):void;
		function get endian():String;
		function set endian(value:String):void;
		function get length():uint;
		function set length(value:uint):void;
		function get objectEncoding():uint;
		function set objectEncoding(value:uint):void;
		function get position():uint;
		function set position(value:uint):void;
		
		function readBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void;
		function writeBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void;
		function writeBoolean(value:Boolean):void;
		function writeByte(value:int):void;
		function writeShort(value:int):void;
		function writeInt(value:int):void;
		function writeUnsignedInt(value:uint):void;
		function writeFloat(value:Number):void;
		function writeDouble(value:Number):void;
		function writeMultiByte(value:String, charSet:String):void;
		function writeUTF(value:String):void;
		function writeUTFBytes(value:String):void;
		function readBoolean():Boolean;
		function readByte():int;
		function readUnsignedByte():uint;
		function readShort():int;
		function readUnsignedShort():uint;
		function readInt():int;
		function readUnsignedInt():uint;
		function readFloat():Number;
		function readDouble():Number;
		function readMultiByte(length:uint, charSet:String):String;
		function readUTF():String;
		function readUTFBytes(length:uint):String;
		function writeObject(object:*):void;
		function readObject():*;
		
		function compress():void;
		function uncompress():void;
	}
	
}